package com.zeus.core.report;

import com.zeus.common.enums.ZeusAlarmLevelEnum;
import com.zeus.common.enums.ZeusEventTypeEnum;

/**
 * API上报工具
 *
 * @author f1ybear_wang  2022/2/25 10:42 上午
 */
public class ZeusReportApiClient extends AbstractOpenApiZeusReportClient {

    public ZeusReportApiClient(ZeusAlarmLevelEnum alarmLevelEnum, String message, String solution, String className,
        String methodName, Integer lineNumber, String fileName) {
        super();
        this.gatherRule.setAlarmLevel(alarmLevelEnum);
        this.message = message;
        this.solution = solution;
        this.className = className;
        this.methodName = methodName;
        this.lineNumber = lineNumber == null ? null : lineNumber.toString();
        this.fileName = fileName;
    }

    @Override
    public ZeusEventTypeEnum eventType() {
        return ZeusEventTypeEnum.API_EVENT;
    }

    @Override
    protected void parsingExtend() {
        this.parsingExtendInit = true;
    }
}
